
package com.epam.android.training.level1.rss;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

/**
 * @author Anton Novikov
 */
public class FeedBo extends LightFeedBo {

  private List<ItemBo> items;

  @Override
  public boolean isLight() {
    return false;
  }

  @Override
  public List<ItemBo> getItems() {
    if (items == null) {
      items = new ArrayList<ItemBo>();
    }

    return items;
  }

  @Override
  public void addItem(ItemBo item) {
    getItems().add(item);
  }

  @Override
  public void addItems(Collection<ItemBo> items) {
    getItems().addAll(items);
  }

  @Override
  public void setItems(List<ItemBo> items) {
    this.items = items;
  }
}
